#pragma once

#include <vector>
#include <string>
#include <functional>

typedef std::function<int (int, int)> func_t;

int add(int x, int y) { return x + y; }
int sub(int x, int y) { return x - y; }
int mult(int x, int y) { return x * y; }
int divi(int x, int y) { return x / y; }

std::vector<func_t> func_v;
std::vector<std::string> name_v;

void lode_func()
{
    func_v.push_back(add);
    func_v.push_back(sub);
    func_v.push_back(mult);
    func_v.push_back(divi);
}

void lode_name()
{
    name_v.push_back("+");
    name_v.push_back("-");
    name_v.push_back("*");
    name_v.push_back("/");
}

class Task
{
public:
    Task()
    {}

    Task(int x, int y, int type, func_t func)
        :_x(x), _y(y), _type(type), _func(func)
    {}

    int operator()()
    {
        return _func(_x, _y);
    }

    int _x;
    int _y;
    int _type;
    func_t _func;
};